package com.neusoft.neuiotms.dcam.workflow.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.bizcore.auth.common.bean.UserBean;
import com.neusoft.bizcore.web.dto.result.ResultDTO;
import com.neusoft.neuiotms.dcam.workflow.dto.ITSMApproveDTO;
import com.neusoft.neuiotms.dcam.workflow.service.ConfirmKJService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "科技公司确认表单")
@RestController
@RequestMapping(value = "/api/w/workflow/confirms")
public class ConfirmKJController {

    @Autowired
    private ConfirmKJService confirmKJService;

    @ApiOperation("新增科技公司流程确认节点")
    @PostMapping
    public ResultDTO<ITSMApproveDTO> create(@RequestBody final ITSMApproveDTO dto, final UserBean user) {
        return ResultDTO.success(this.confirmKJService.confirm(dto, user));
    }

}
